#ifndef BORROWEDBOOK_H
#define BORROWEDBOOK_H
#include "book.h"
#include <QCheckBox>
#include <QDate>
#include <QObject>
#include<QDebug>
// 已借阅的图书类
class BorrowedBook:public Book
{
public:
    BorrowedBook();
    BorrowedBook(const QString &name, const QString &publisher, const QString &author, const QString &ISBN, const QString &category, const QString &collectionLocation, int currentCollection, int allCollection,const QDate&loanTime,QCheckBox*checkBox);
    QDate getLoanTime() const;
    void setLoanTime(const QDate &newLoanTime);

    bool getIsChecked() const;
    void setIsChecked(bool newIsChecked);

    bool operator<(const BorrowedBook&book);
    QCheckBox *getCheckBox() const;
    void setCheckBox(QCheckBox *newCheckBox);
    virtual ~BorrowedBook();
private:
    // 借阅时间
    QDate loanTime;
    // 判断是否勾选
    bool isChecked;
    // 勾选框
    QCheckBox*checkBox;
};

#endif // BORROWEDBOOK_H
